Fixing gtk_cell_area_box_focus().
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Sat, 4 Dec 2010 12:49:44 +0000 (21:49 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sat, 4 Dec 2010 12:49:44 +0000 (21:49 +0900)
the ->focus() method was getting mixed up when more than
one cell was in the same group (not aligned), added the
proper check to break out of the loop on time.

gtk/gtkcellareabox.c

index e24119a75a10886f6fc64235cf3b1a20c7aadfb3..e69a323150fa7aad0e94e43c9ed04d6c6642694b 100644 (file)
@@ -1967,7 +1967,7 @@ gtk_cell_area_box_focus (GtkCellArea      *area,
          CellGroup *group = &g_array_index (priv->groups, CellGroup, i);
          
          for (list = (cycle == FOCUS_NEXT) ? g_list_first (group->cells) : g_list_last (group->cells); 
-              list; list = (cycle == FOCUS_NEXT) ? list->next : list->prev)
+              cycled_focus == FALSE && list; list = (cycle == FOCUS_NEXT) ? list->next : list->prev)
            {
              CellInfo *info = list->data;